** Peisakhin and Queralt
** Elite Repression, CPS
** May 20, 2025

clear all

** set path
	 cd ""

** Install auxiliary packages
	**	ssc install coefplot
	**	ssc install acreg
	**	ssc install hdfe
	**	ssc install sutex2
 	**  ssc install estout
	**  ssc install outreg2
	**  ssc install acreg
	**  ssc install ranktest
	**  ssc install reghdfe
	**  ssc install gtools
	**  ssc install moremata


****************************************************
* Figure 1 - [The Geography of Priest Repression]
****************************************************	

** Refer to R script


****************************************************
* Table 1 - [Balance]
****************************************************	

clear all

use "2_historical_gemeinde_1949_1969.dta", clear

* N in control
count if treated_town_dummy == 0 & cath_28_vote  !=.

* N in treatment
count if treated_town_dummy == 1 & cath_28_vote  !=.


** This code creates a latex table with group means, their differences, and the latter's p-value. 
estpost ttest cath_28_vote  nazi_28_vote  perc_catholic_1933 ln_population_1933 ln_income_tax agriculture_pop_1939 , by(treated_town_dummy)
esttab using "/Tables/Table_1.tex", ///
    replace ///
    wide nonumber noobs p(2)  ///
    cells("mu_1(fmt(2) label(No Repressed Priest)) mu_2(fmt(2) label(Repressed Priest)) b(fmt(2) label(Difference)) p(fmt(3) label(p-value))") ///
	prehead("\documentclass{article}" "\usepackage{booktabs}" "\begin{document}" "\begin{tabular}{l*{1}{cccc}}") ///
    prefoot(`"\hline"' ///
                `"N & 2,524 & 1,966 &  & \\"') /// 
	postfoot("\end{tabular}" "\end{document}") 
	

****************************************************
** Table 2 - [Main]
****************************************************


use "2_historical_gemeinde_1949_1969.dta", clear


** Note to coder: This code creates a very long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after.

* Relabel for formatting efficiency
label variable csu_1949_histgem "1949"
label variable csu_1953_histgem "1953"
label variable csu_1957_histgem "1957"
label variable csu_1961_histgem "1961"
label variable csu_1965_histgem "1965"
label variable csu_1969_histgem "1969"


** Repressed Priest in Town (binary) - columns 1 to 6
areg csu_1949_histgem treated_town_dummy ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_2.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("Unit of analysis: historical municipality. Robust standard errors in parentheses clustered at historical district level. *** p$<$0.01, ** p$<$0.05, * p$<$0.1.")

areg csu_1953_histgem  treated_town_dummy ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1957_histgem  treated_town_dummy ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1961_histgem  treated_town_dummy ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1965_histgem  treated_town_dummy ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1969_histgem  treated_town_dummy ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 


** Repressed Priest in Town (count) - columns 7 to 12
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) 

areg csu_1953_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1957_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1961_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_2.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 



****************************************************
** Figure 2 - [Long-run]
****************************************************

clear all 

use "4_modern_gemeinde_1961_2021.dta", clear

quiet areg csu_1961_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote perc_change_elig_v_61_49_newgem aggr_residen_dum aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1961

quiet areg csu_1965_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_65_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1965

quiet areg csu_1969_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_69_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1969

quiet areg csu_1972_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_72_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1972

quiet areg csu_1976_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_76_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1976

quiet areg csu_1980_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_80_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1980

quiet areg csu_1983_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_83_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1983

quiet areg csu_1987_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_87_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1987

quiet areg csu_1990_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_90_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1990

quiet areg csu_1994_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_94_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1994

quiet areg csu_1998_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_98_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_1998

quiet areg csu_2002_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_02_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_2002

quiet areg csu_2005_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_05_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_2005

quiet areg csu_2009_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_09_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_2009

quiet areg csu_2013_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_13_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_2013

quiet areg csu_2017_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_17_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_2017

quiet areg csu_2021_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_21_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
estimates store long_run_2021

coefplot (long_run_1961, label(1961)) (long_run_1965, label(1965)) (long_run_1969, label(1969)) (long_run_1972, label(1972)) (long_run_1976, label(1976)) (long_run_1980, label(1980)) (long_run_1983, label(1987)) (long_run_1990, label(1990)) (long_run_1994, label(1994)) (long_run_1998, label(1998)) (long_run_2002, label(2002)) (long_run_2005, label(2005)) (long_run_2009, label(2009)) (long_run_2013, label(2013)) (long_run_2017, label(2017)) (long_run_2021, label(2021)), keep(aggr_intensive_per_th_cap_1969) xline(0) title("# of priests repressed per 1,000 capita (1969)",size(small))  ylabel(none) xlabel(0(0.5)2)  levels(95 90)  ciopts(lwidth(1 ..) lcolor(*.2 *.8 )) msize(medlarge)

graph export "/Figures/Figure_2.pdf", replace


****************************************************
** Figure 3 - [By Municipality Size]
****************************************************

clear all

use "2_historical_gemeinde_1949_1969.dta", clear

* Generate quartiles
xtile quartile = population_1933, nq(4)
pctile pct = population_1933, nq(4)
tab quartile 

** The code generates 6 different figures (a-f), one for each election in the historical sample

** Figure 3a (1949 election)

quiet areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 if quartile == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1949_100

quiet areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 if quartile == 2, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1949_200

quiet areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 if quartile == 3, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1949_300

quiet areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 if quartile == 4, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1949_400

coefplot (short_extensive_1949_100, label(1st quartile)) (short_extensive_1949_200, label(2nd quartile)) (short_extensive_1949_300, label(3d quartile)) (short_extensive_1949_400, label(4th quartile)),  drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933) vertical  xlabel(none) ci(95 90) legend(size(large) position(6) rows(1) ) ciopts(lwidth(1.5 ..) lcolor(*.3 *.8 )) msize(large)

graph export "/Figures/Figure_3a.pdf", replace



** Figure 3b (1953 election) 

quiet areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if quartile == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1953_100

quiet areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if quartile == 2, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1953_200

quiet areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if quartile == 3, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1953_300

quiet areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if quartile == 4, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1953_400

coefplot (short_extensive_1953_100, label(1st quartile)) (short_extensive_1953_200, label(2nd quartile)) (short_extensive_1953_300, label(3rd quartile)) (short_extensive_1953_400, label(4th quartile)),  drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_change_elig_v_* perc_catholic_1933 ) vertical legend(size(large) position(6) rows(1) )   xlabel(none) ci(95 90) ciopts(lwidth(1.5 ..) lcolor(*.3 *.8 )) msize(large) 

graph export "/Figures/Figure_3b.pdf", replace


** Figure 3c (1957 election) 
 
quiet areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem if quartile == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1957_100

quiet areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem  if quartile == 2, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1957_200

quiet areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem  if quartile == 3, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1957_300

quiet areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem  if quartile == 4, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1957_400

coefplot (short_extensive_1957_100, label(1st quartile)) (short_extensive_1957_200, label(2nd quartile)) (short_extensive_1957_300, label(3rd quartile)) (short_extensive_1957_400, label(4th quartile)) ,  drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_change_elig_v_* perc_catholic_1933) vertical legend(size(large) position(6) rows(1) )   xlabel(none) ci(95 90) ciopts(lwidth(1.5 ..) lcolor(*.3 *.8 )) msize(large)

graph export "/Figures/Figure_3c.pdf", replace


** Figure 3d (1961 election) 

quiet areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem  if quartile == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1961_100

quiet areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem if quartile== 2, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1961_200

quiet areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem if quartile == 3, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1961_300

quiet areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem  if quartile == 4, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1961_400

coefplot (short_extensive_1961_100, label(1st quartile)) (short_extensive_1961_200, label(2nd quartile)) (short_extensive_1961_300, label(3rd quartile)) (short_extensive_1961_400, label(4th quartile)) ,  drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_change_elig_v_* perc_catholic_1933  ) vertical legend(size(large) position(6) rows(1) )  xlabel(none) ci(95 90) ciopts(lwidth(1.5 ..) lcolor(*.3 *.8 )) msize(large)

graph export "/Figures/Figure_3d.pdf", replace

** Figure 3e (1965 election) 

quiet areg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem if quartile == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1965_100
 
quiet areg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem  if quartile== 2, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1965_200
 
quiet areg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem if quartile == 3, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1965_300
 
quiet areg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem  if quartile == 4, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1965_400
 
coefplot (short_extensive_1965_100, label(1st quartile)) (short_extensive_1965_200, label(2nd quartile)) (short_extensive_1965_300, label(3rd quartile)) (short_extensive_1965_400, label(4th quartile)) ,  drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_change_elig_v_* perc_catholic_1933) vertical legend(size(large) position(6) rows(1) )  xlabel(none) ci(95 90) ciopts(lwidth(1.5 ..) lcolor(*.3 *.8 )) msize(large)

graph export "/Figures/Figure_3e.pdf", replace

** Figure 3f (1969 election) 

quiet areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem   if quartile == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1969_100
 
quiet areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem if quartile== 2, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1969_200
 
quiet areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem  if quartile == 3, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1969_300
 
quiet areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem if quartile == 4, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store short_extensive_1969_400
 
coefplot (short_extensive_1969_100, label(1st quartile)) (short_extensive_1969_200, label(2nd quartile)) (short_extensive_1969_300, label(3rd quartile)) (short_extensive_1969_400, label(4th quartile)) ,  drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_change_elig_v_* perc_catholic_1933) vertical legend(size(large) position(6) rows(1) )  xlabel(none) ci(95 90) ciopts(lwidth(1.5 ..) lcolor(*.3 *.8 )) msize(large)

graph export "/Figures/Figure_3f.pdf", replace



****************************************************
** Figure 4 - [old vs. young priests]
****************************************************

clear all
use "2_historical_gemeinde_1949_1969.dta", clear

** Age of the youngest priest repressed in a given town
tab youngest_repressed_priest

** Threecat classifies towns into three categories: 0 - towns with no priest repressed; 1 - towns in which the youngest priest repressed was born after 1890; 2 - towns in which the youngest priest repressed was born before 1890
gen threecat = 0 if treated_town_cont == 0
replace threecat = 1 if youngest_repressed_priest >= 1890 & youngest_repressed_priest !=.
replace threecat = 2 if youngest_repressed_priest < 1890 & youngest_repressed_priest !=.
label define threecat_lab 0 "No Repression" 1 "Priest born after 1890" 2 "Priest born before 1890"
label values threecat threecat_lab
tab threecat



** For plotting purposes, we do the following renaming
	gen treated_town_cont_1949 = treated_town_cont
	gen treated_town_cont_1953 = treated_town_cont
	gen treated_town_cont_1957 = treated_town_cont
	gen treated_town_cont_1961 = treated_town_cont
	gen treated_town_cont_1965 = treated_town_cont
	gen treated_town_cont_1969 = treated_town_cont

	label var treated_town_cont_1949 "1949 election"
	label var treated_town_cont_1953 "1953 election"
	label var treated_town_cont_1957 "1957 election"
	label var treated_town_cont_1961 "1961 election"
	label var treated_town_cont_1965 "1965 election"
	label var treated_town_cont_1969 "1969 election"
	

** No repression vs. repression of "old" priest
eststo born_before_1890_for_1949: quiet areg csu_1949_histgem treated_town_cont_1949 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 if (threecat == 0 | threecat == 2) , cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_before_1890_for_1953: quiet areg csu_1953_histgem treated_town_cont_1953 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if (threecat == 0 | threecat == 2), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_before_1890_for_1957: quiet areg csu_1957_histgem treated_town_cont_1957 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem if (threecat == 0 | threecat == 2), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_before_1890_for_1961: quiet areg csu_1961_histgem treated_town_cont_1961 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem if (threecat == 0 | threecat == 2) , cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_before_1890_for_1965: quiet areg csu_1965_histgem treated_town_cont_1965 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem if (threecat == 0 | threecat == 2) , cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_before_1890_for_1969: quiet areg csu_1969_histgem treated_town_cont_1969 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem if (threecat == 0 | threecat == 2) , cluster(id_hist_landkreis) absorb(id_modern_landkreis)

** No repression vs. repression of "young" priest
eststo born_after_1890_for_1949: quiet areg csu_1949_histgem treated_town_cont_1949 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933  if (threecat == 0 | threecat == 1), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_after_1890_for_1953: quiet areg csu_1953_histgem treated_town_cont_1953 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if (threecat == 0 | threecat == 1), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_after_1890_for_1957: quiet areg csu_1957_histgem treated_town_cont_1957 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem if (threecat == 0 | threecat == 1), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_after_1890_for_1961: quiet areg csu_1961_histgem treated_town_cont_1961 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem if (threecat == 0 | threecat == 1), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_after_1890_for_1965: quiet areg csu_1965_histgem treated_town_cont_1965 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem if (threecat == 0 | threecat == 1), cluster(id_hist_landkreis) absorb(id_modern_landkreis)

eststo born_after_1890_for_1969: quiet areg csu_1969_histgem treated_town_cont_1969 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem if (threecat == 0 | threecat == 1), cluster(id_hist_landkreis) absorb(id_modern_landkreis)


coefplot (born_before_1890_for_1949, msymbol(O) offset(.1) mcolor(black) ciopts(lcolor(black black) lwidth(.6 .9))) /// 
(born_after_1890_for_1949, msymbol(T)  offset(-.1)  mcolor(gs10) ciopts(lcolor(gs10 gs10) lwidth(.6 .9))) /// 
(born_before_1890_for_1953, msymbol(O)  offset(.1)  mcolor(black) ciopts(lcolor(black black) lwidth(.6 .9))) ///
(born_after_1890_for_1953, msymbol(T)  offset(-.1)  mcolor(gs10) ciopts(lcolor(gs10 gs10) lwidth(.6 .9))) ///
(born_before_1890_for_1957, msymbol(O) offset(.1)  mcolor(black) ciopts(lcolor(black black) lwidth(.6 .9))) ///
(born_after_1890_for_1957, msymbol(T)  offset(-.1)  mcolor(gs10) ciopts(lcolor(gs10 gs10) lwidth(.6 .9))) ///
 (born_before_1890_for_1961, msymbol(O) offset(.1) mcolor(black) ciopts(lcolor(black black) lwidth(.6 .9))) ///
 (born_after_1890_for_1961, msymbol(T)  offset(-.1)  mcolor(gs10) ciopts(lcolor(gs10 gs10) lwidth(.6 .9))) ////
 (born_before_1890_for_1965, msymbol(O) offset(.1)  mcolor(black) ciopts(lcolor(black black) lwidth(.6 .9))) ///
 (born_after_1890_for_1965, msymbol(T)  offset(-.1)  mcolor(gs10) ciopts(lcolor(gs10 gs10) lwidth(.6 .9))) ///
 (born_before_1890_for_1969, msymbol(O) offset(.1)  mcolor(black) ciopts(lcolor(black black) lwidth(.6 .9))) ///
 (born_after_1890_for_1969, msymbol(T)  offset(-.1)  mcolor(gs10) ciopts(lcolor(gs10 gs10) lwidth(.6 .9))), ///
 drop(_cons ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933  perc_change_elig_v_*) xline(0, lcolor(gs12)) 

** Note to coder: The legend of the resulting figure is adjusted manually (via Graph Editor)
graph export "/Figures/Figure_4.pdf", replace



****************************** 
* Table 3 - [Turnout]
******************************

use "2_historical_gemeinde_1949_1969.dta", clear
 
* Turnout models, 1961-1969
areg turnout_1949_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_3.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("Unit of analysis: historical municipality. Standard errors in parentheses clustered at historical district level. *** p$<$0.01, ** p$<$0.05, * p$<$0.1.")

areg turnout_1953_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_3.tex", append dec(2) drop(perc_change_elig_v_53_49_histgem) label  addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg turnout_1957_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_3.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg turnout_1961_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_3.tex", append dec(2) label  drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg turnout_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933  perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_3.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg turnout_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_3.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)





****************************************************
** Figure 5 - [Mass Attendance]
****************************************************

clear all 

use "4_modern_gemeinde_1961_2021.dta", clear

* 1970
quiet areg mass_attendance_new_gem_1970 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_69_49_newgem aggr_perc_catholic_1933 ,r  absorb(id_modern_landkreis)
estimates store attenance_1970

*1980
quiet areg mass_attendance_new_gem_1980 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_80_49_newgem aggr_perc_catholic_1933,r   absorb(id_modern_landkreis)
estimates store attenance_1980

*1990
quiet areg mass_attendance_new_gem_1990 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_90_49_newgem aggr_perc_catholic_1933,  r absorb(id_modern_landkreis)
estimates store attenance_1990

*2010
quiet areg mass_attendance_new_gem_2010 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_09_49_newgem aggr_perc_catholic_1933, r absorb(id_modern_landkreis)
estimates store attenance_2010

coefplot (attenance_1970, label(1970)) (attenance_1980, label(1980)) (attenance_1990, label(1990)) (attenance_2010, label(2010)), keep(aggr_intensive_per_th_cap_1969)  title("", size(normal)) ylabel(none) xlabel(0(0.5)4.5) levels(95 90) ciopts(lwidth(1.5 ..) lcolor(*.2 *.8 )) xline(0) msize(large)

graph export "/Figures/Figure_5.pdf", replace




**********************
**********************
**********************
****   APPENDIX   ****
**********************
**********************
**********************


****************************************************
** Table A-1  [Descriptives historical borders]
****************************************************

use "2_historical_gemeinde_1949_1969.dta", clear

* This code generates three latex tables with the descriptives statistics for the Outcome variables, Repression variables, and Baseline Controls, respectively. 

label variable csu_1949_histgem "1949 CSU vote share"
label variable csu_1953_histgem "1953 CSU vote share"
label variable csu_1957_histgem "1957 CSU vote share"
label variable csu_1961_histgem "1961 CSU vote share"
label variable csu_1965_histgem "1965 CSU vote share"
label variable csu_1969_histgem "1969 CSU vote share"

* Outcome variables
sutex2 csu_1949_histgem csu_1953_histgem csu_1957_histgem csu_1961_histgem csu_1965_histgem csu_1969_histgem, minmax varlabels digits(2) saving("Tables/Table_A1_top.tex") replace

* Repression variables
sutex2 treated_town_dummy treated_town_cont max_repression_qual max_repression_int, minmax varlabels digits(2) saving("Tables/Table_A1_middle.tex") replace

* Baseline controls
sutex2 cath_28_vote perc_catholic_1933 nazi_28_vote ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939, minmax varlabels digits(2) saving("Tables/Table_A1_bottom.tex") replace


****************************************************
** Table A-2 [Descriptives post-1970 borders]
****************************************************
	
use "4_modern_gemeinde_1961_2021.dta", clear

sutex2 aggr_intensive_per_th_cap_1969 aggr_intensive_per_th_cap_1933 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum aggr_perc_catholic_1933 mass_attendance_new_gem_1970 mass_attendance_new_gem_1980 mass_attendance_new_gem_1990 mass_attendance_new_gem_2010 share_yes_ban, minmax varlabel digit(2) saving("Tables/Table_A2.tex") replace


****************************************************
** Figure A-1 [Religious Sorting]
****************************************************

use "1_both_denominations_hist_gemeinde.dta", clear

** Express ratio of Catholics in Percentage 

hist perc_catholic_1933, xline(90)

graph export "/Figures/Figure_A1.pdf", replace



****************************************************
** Figure A-2  [Jewish Settlements]
****************************************************

** Refer to R script

	
****************************************************
** Table A-3  [Balance Tables]
****************************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** The two panels (top and bottomw) are stacked manually.

* Catholic Vote [top panel]
estpost ttest  cath_20_vote cath_24_may cath_24_dec cath_28_vote cath_30_vote cath_32_july cath_32_nov cath_33_vote cath_vote_interwar, by(treated_town_dummy)
esttab using "Tables/Table_A3_top.tex", ///
    replace ///
    wide nonumber p(2) noobs ///
    cells("mu_1(fmt(2) label(No Repressed Priest)) mu_2(fmt(2) label(Repressed Priest)) b(fmt(2) label(Difference)) p(fmt(3) label(p-value))") ///
    prehead("\documentclass{article}" "\usepackage{booktabs}" "\begin{document}" "\begin{tabular}{l*{1}{cccc}}") ///
    postfoot("\end{tabular}" "\end{document}") 
	

*** Nazi Vote [bottom panel]
estpost ttest  nazi_24_may nazi_24_dec nazi_28_vote nazi_30_vote nazi_32_july nazi_32_nov nazi_33_vote nazi_vote_interwar, by(treated_town_dummy)
esttab using "Tables/table_A3_bottom.tex", ///
    replace ///
    wide nonumber p(2) noobs ///
    cells("mu_1(fmt(2) label(No Repressed Priest)) mu_2(fmt(2) label(Repressed Priest)) b(fmt(2) label(Difference)) p(fmt(3) label(p-value))") ///
    prehead("\documentclass{article}" "\usepackage{booktabs}" "\begin{document}" "\begin{tabular}{l*{1}{cccc}}") ///
    postfoot("\end{tabular}" "\end{document}") 
	


****************************************************
** Figure A-3 
****************************************************

use "2_historical_gemeinde_1949_1969.dta", clear

gen treated_town_cont_1949 = treated_town_cont
label variable treated_town_cont_1949 "1949 election"
gen treated_town_cont_1953 = treated_town_cont
label variable treated_town_cont_1953 "1953 election"
gen treated_town_cont_1957 = treated_town_cont
label variable treated_town_cont_1957 "1957 election"
gen treated_town_cont_1961 = treated_town_cont
label variable treated_town_cont_1961 "1961 election"
gen treated_town_cont_1965 = treated_town_cont
label variable treated_town_cont_1965 "1965 election"
gen treated_town_cont_1969 = treated_town_cont
label variable treated_town_cont_1969 "1969 election"

quietly areg csu_1949_histgem treated_town_cont_1949 cath_32_nov  perc_catholic_1933 nazi_33_vote ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store cath_nov1932_control_1949

quietly areg csu_1953_histgem treated_town_cont_1953 cath_32_nov  perc_catholic_1933 nazi_33_vote ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store cath_nov1932_control_1953

quietly areg csu_1957_histgem treated_town_cont_1957 cath_32_nov  perc_catholic_1933 nazi_33_vote  ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store cath_nov1932_control_1957

quietly areg csu_1961 treated_town_cont_1961 cath_32_nov  perc_catholic_1933 nazi_33_vote  ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store cath_nov1932_control_1961

quietly areg csu_1965 treated_town_cont_1965 cath_32_nov  perc_catholic_1933 nazi_33_vote  ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store cath_nov1932_control_1965

quietly areg csu_1969_histgem treated_town_cont_1969 cath_32_nov  perc_catholic_1933 nazi_33_vote ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store cath_nov1932_control_1969

coefplot (cath_nov1932_control_1949, msymbol(o) offset(0.00) label("")) (cath_nov1932_control_1953, msymbol(o) offset(0.00)  label("")) (cath_nov1932_control_1957, msymbol(o) offset(0.00)  label("")) (cath_nov1932_control_1961, msymbol(o) offset(0.00) label(""))  (cath_nov1932_control_1965, msymbol(o) offset(0.00) label("")) (cath_nov1932_control_1969, msymbol(o) offset(0.00)  label("")), drop(_cons cath_32_nov  perc_catholic_1933 nazi_33_vote ln_population_1933 ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 perc_change_elig_v_53_49_histgem perc_change_elig_v_57_49_histgem perc_change_elig_v_61_49_histgem perc_change_elig_v_65_49_histgem perc_change_elig_v_69_49_histgem) xlab(0(.25)1) legend(off) ciopts(lwidth(.8 ..))  msize(large)


graph export "/Figures/Figure_A3.pdf", replace


****************************************************
* Table A-4 [Figure 2 in Regression Format]
****************************************************

clear all 

use "4_modern_gemeinde_1961_2021.dta", clear

** Column titles:
	label variable csu_1961_share "1961"
	label variable csu_1965_share "1965"
	label variable csu_1969_share "1969"
	label variable csu_1972_share "1972"
	label variable csu_1976_share "1976"
	label variable csu_1980_share "1980"
	label variable csu_1983_share "1983"
	label variable csu_1987_share "1987"
	label variable csu_1990_share "1990"
	label variable csu_1994_share "1994"
	label variable csu_1998_share "1998"
	label variable csu_2002_share "2002"
	label variable csu_2005_share "2005"
	label variable csu_2009_share "2009"
	label variable csu_2013_share "2013"
	label variable csu_2017_share "2017"
	label variable csu_2021_share "2021"
	
** Top panel

areg csu_1961_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote perc_change_elig_v_61_49_newgem aggr_residen_dum aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A4_top.tex", replace dec(2) label drop(perc_change_elig_v_61_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) nonotes addnote("Unit of analysis: modern-day municipality. Standard errors in parentheses clustered at modern-day district level. *** p$<$0.01, ** p$<$0.05, * p$<$0.1.")

areg csu_1965_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_65_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_65_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1969_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_69_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_69_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1972_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_72_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_72_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1976_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_76_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_76_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1980_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_80_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_80_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1983_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_83_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_83_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1987_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_87_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_87_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1990_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_90_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_top.tex", append dec(2) label drop(perc_change_elig_v_90_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* Bottom Panel

areg csu_1994_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_94_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", replace dec(2) label drop(perc_change_elig_v_94_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) nonotes addnote("Unit of analysis: modern-day municipality. Standard errors in parentheses clustered at modern-day district level. *** p$<$0.01, ** p$<$0.05, * p$<$0.1.")


areg csu_1998_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_98_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_98_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_2002_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_02_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_02_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_2005_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_05_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_05_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_2009_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_09_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_09_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_2013_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_13_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_13_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_2017_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_17_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_17_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_2021_share aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_21_49_newgem aggr_perc_catholic_1933, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A4_bottom.tex", append dec(2) label drop(perc_change_elig_v_21_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


****************************************************
* Table A-5 (Per Capita Repression)
****************************************************

use "2_historical_gemeinde_1949_1969.dta", clear


* Relabel for formatting efficiency
label variable csu_1949_histgem "1949"
label variable csu_1953_histgem "1953"
label variable csu_1957_histgem "1957"
label variable csu_1961_histgem "1961"
label variable csu_1965_histgem "1965"
label variable csu_1969_histgem "1969"

** 1949 
areg csu_1949_histgem repression_pc_1933 ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A5.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

** 1953
areg csu_1953_histgem  repression_pc_1933 ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A5.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1957
areg csu_1957_histgem  repression_pc_1933 ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A5.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1961
areg csu_1961_histgem  repression_pc_1933 ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A5.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1965
areg csu_1965_histgem  repression_pc_1933 ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A5.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1969
areg csu_1969_histgem  repression_pc_1933 ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A5.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 


****************************************************
* Table A-6 (Diocese FE)
****************************************************

use "2_historical_gemeinde_1949_1969.dta", clear


** Relabel for formatting efficiency
label variable csu_1949_histgem "1949"
label variable csu_1953_histgem "1953"
label variable csu_1957_histgem "1957"
label variable csu_1961_histgem "1961"
label variable csu_1965_histgem "1965"
label variable csu_1969_histgem "1969"


** Note to coder: Fixed effect row added manually.

areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 , cluster(id_hist_landkreis) absorb(id_diocese)
outreg2 using "/Tables/Table_A6.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Diocese fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

areg csu_1953_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_diocese)
outreg2 using "/Tables/Table_A6.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Diocese fixed effect, Yes)

areg csu_1957_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_diocese)
outreg2 using "/Tables/Table_A6.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Diocese fixed effect, Yes)

areg csu_1961_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_diocese)
outreg2 using "/Tables/Table_A6.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Diocese fixed effect, Yes)

areg csu_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_diocese)
outreg2 using "/Tables/Table_A6.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Diocese fixed effect, Yes)
 
areg csu_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_diocese)
outreg2 using "/Tables/Table_A6.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Diocese fixed effect, Yes)



**********************************************************
** TABLE A-7 (Religious Building in Town)
**********************************************************

use "2_historical_gemeinde_1949_1969.dta", clear


** Relabel for formatting efficiency
label variable csu_1949_histgem "1949"
label variable csu_1953_histgem "1953"
label variable csu_1957_histgem "1957"
label variable csu_1961_histgem "1961"
label variable csu_1965_histgem "1965"
label variable csu_1969_histgem "1969"

** Note to coder: Fixed effect row added manually.

areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 if rel_building_in_gemeinde == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A7.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

areg csu_1953_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem if rel_building_in_gemeinde == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A7.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1957_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem if rel_building_in_gemeinde == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A7.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes)

areg csu_1961_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem if rel_building_in_gemeinde == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A7.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem if rel_building_in_gemeinde == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A7.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem if rel_building_in_gemeinde == 1, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A7.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


********************************************************* 
* Table A-8 [Spatial Correlation]
********************************************************* 

use "2_historical_gemeinde_1949_1969.dta", clear

gen _CX = lat_4326
gen _CY = long_4326


** Modify name of variable to avoid error related to long variable labels
	gen elig_53_49 = perc_change_elig_v_53_49_histgem
	gen elig_57_49 = perc_change_elig_v_57_49_histgem
	gen elig_61_49 = perc_change_elig_v_61_49_histgem 
	gen elig_65_49 = perc_change_elig_v_65_49_histgem
	gen elig_69_49 = perc_change_elig_v_69_49_histgem

	
** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"


acreg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, latitude(lat_4326) longitude(long_4326) dist(25) spatial  pfe1(id_modern_landkreis) bartlett 
outreg2 using "/Tables/Table_A8.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Conley Standard Errors of 25km radius and Barlett decay; *** p<0.01, ** p<0.05, * p<0.1.}")

acreg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 elig_53_49, latitude(lat_4326) longitude(long_4326) dist(25) spatial  pfe1(id_modern_landkreis) bartlett
outreg2 using "/Tables/Table_A8.tex", append dec(2) label drop(elig_53_49) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

acreg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 elig_57_49, latitude(lat_4326) longitude(long_4326) dist(25) spatial  pfe1(id_modern_landkreis) bartlett
outreg2 using "/Tables/Table_A8.tex", append dec(2) label drop(elig_57_49) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

acreg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 elig_61_49, latitude(lat_4326) longitude(long_4326) dist(25) spatial  pfe1(id_modern_landkreis) bartlett
outreg2 using "/Tables/Table_A8.tex", append dec(2) label drop(elig_61_49) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

acreg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 elig_65_49, latitude(lat_4326) longitude(long_4326) dist(25) spatial  pfe1(id_modern_landkreis) bartlett
outreg2 using "/Tables/Table_A8.tex", append dec(2) label drop(elig_65_49) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

acreg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 elig_69_49, latitude(lat_4326) longitude(long_4326) dist(25) spatial  pfe1(id_modern_landkreis) bartlett
outreg2 using "/Tables/Table_A8.tex", append dec(2) label drop(elig_69_49) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)



**********************************************************
** Table A-9 [Alternative Initial Support Measures]
***********************************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** This code creates three tables (TOP, MIDDLE, BOTTOM), which are manually stacked in the latex editor.

	
** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"

	
*** TOP PANEL 

*** 1920 Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_20_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_top.tex", replace dec(2) label keep(treated_town_cont cath_20_vote) nocons nonotes addnote("\footnotesize{All controls and modern-district FE included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

areg csu_1969_histgem treated_town_cont ln_population_1933 cath_20_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A9_top.tex", append dec(2) label keep(treated_town_cont cath_20_vote)  nocons

*** 1924 May Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_24_may ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_top.tex", append dec(2) label keep(treated_town_cont cath_24_may)  nocons

areg csu_1969_histgem treated_town_cont ln_population_1933 cath_24_may ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_top.tex", append dec(2) label keep(treated_town_cont cath_24_may)  nocons

*** 1924 December Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_24_dec ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A9_top.tex", append dec(2) label keep(treated_town_cont cath_24_dec)  nocons

areg csu_1969_histgem treated_town_cont ln_population_1933 cath_24_dec ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_top.tex", append dec(2) label keep(treated_town_cont cath_24_dec)  nocons


*** MIDDLE PANEL 

** 1928 Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A9_middle.tex", replace dec(2) label keep(treated_town_cont cath_28_vote)  nocons nonotes addnote("\footnotesize{All controls and modern-district FE included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")


areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_middle.tex", append dec(2) label keep(treated_town_cont cath_28_vote)  nocons

** 1930 Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_30_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_middle.tex", append dec(2) label keep(treated_town_cont cath_30_vote)  nocons

areg csu_1969_histgem treated_town_cont ln_population_1933 cath_30_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_middle.tex", append dec(2) label keep(treated_town_cont cath_30_vote)  nocons

** 1932 July Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_32_july ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_middle.tex", append dec(2) label keep(treated_town_cont cath_32_july)  nocons

areg csu_1969_histgem treated_town_cont ln_population_1933 cath_32_july ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_middle.tex", append dec(2) label keep(treated_town_cont cath_32_july)  nocons


**** BOTTOM PANEL

** 1932 November Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_32_nov ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_bottom.tex", replace dec(2) label keep(treated_town_cont cath_32_nov)  nocons nonotes addnote("\footnotesize{All controls and modern-district FE included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}") 


areg csu_1969_histgem treated_town_cont ln_population_1933 cath_32_nov ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_bottom.tex", append dec(2) label keep(treated_town_cont cath_32_nov) nocons


** 1933 Election Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_33_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_bottom.tex", append dec(2)  label keep(treated_town_cont cath_33_vote) nocons

areg csu_1969_histgem treated_town_cont ln_population_1933 cath_33_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_bottom.tex", append dec(2)  label keep(treated_town_cont cath_33_vote) nocons

** Intewar Average Control
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_vote_interwar ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_bottom.tex", append dec(2)  label keep(treated_town_cont cath_vote_interwar) nocons
 
areg csu_1969_histgem treated_town_cont ln_population_1933 cath_vote_interwar ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A9_bottom.tex", append dec(2)  label keep(treated_town_cont cath_vote_interwar) nocons



*******************************************
* Figure A-4 [Repression Categorical]
*******************************************

clear all

use "2_historical_gemeinde_1949_1969.dta", clear

histogram max_repression_qual, discrete xlabel(0 `""No" "repression""' 1 `""Minor," "informal" "threats" "'  2 `""Service" "disrupted," "interrogation""' 3 `""Denunciation," "major fines""' 4 `""Ban on" "teaching," "relocation""' 5 `""Concentration" "camp," "execution""', labsize(small)) xtitle("")

graph export "/Figures/Figure_A4.pdf", replace



*******************************************
* Figure A-5 [Repression Categorical]
*******************************************

clear all

use "2_historical_gemeinde_1949_1969.dta", clear

** Run this code for plotting purposes
	gen repqual_v1_1949 = max_repression_qual
	label variable repqual_v1_1949 "1949 election"

	gen repqual_v1_1953 = max_repression_qual
	label variable repqual_v1_1953 "1953 election"

	gen repqual_v1_1957 = max_repression_qual
	label variable repqual_v1_1957 "1957 election"

	gen repqual_v1_1961 = max_repression_qual
	label variable repqual_v1_1961 "1961 election"

	gen repqual_v1_1965 = max_repression_qual
	label variable repqual_v1_1965 "1965 election"

	gen repqual_v1_1969 = max_repression_qual
	label variable repqual_v1_1969 "1969 election"


** Define labels for plit
label define lab_qual_repression 0 "No repression" 1 "Minor/informal threats" 2 "Service disrupted/interrogation" 3 "Denunciation/fines" 4 "Ban on teaching/relocation" 5 "Concentration camp/execution" 

	label value repqual_v1_1949 lab_qual_repression
	label value repqual_v1_1953 lab_qual_repression
	label value repqual_v1_1957 lab_qual_repression
	label value repqual_v1_1961 lab_qual_repression
	label value repqual_v1_1965 lab_qual_repression
	label value repqual_v1_1969 lab_qual_repression


*** Models

quiet areg csu_1949_histgem i.repqual_v1_1949  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store categorical_49_v1

quiet areg csu_1953_histgem i.repqual_v1_1953  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store categorical_53_v1

quiet areg csu_1957_histgem i.repqual_v1_1957 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store categorical_57_v1

quiet areg csu_1961_histgem i.repqual_v1_1961  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store categorical_61_v1

quiet areg csu_1965_histgem i.repqual_v1_1965 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store categorical_65_v1

quiet areg csu_1969_histgem i.repqual_v1_1969 ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
estimates store categorical_69_v1

coefplot (categorical_49_v1, offset(0.1) )  (categorical_53_v1, offset(0.0))  (categorical_57_v1, offset(-0.1)) (categorical_61_v1, offset(-0.2)) (categorical_65_v1, offset(-0.3)) (categorical_69_v1, offset(0)), drop(_cons  ln_population_1933 cath_28_vote  ln_civil_servants_1939 residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote   *.id_hist_landkreis perc_change_elig_v* perc_catholic_1933) headings(1.repqual_v1_1949 = "{bf:1949 Election}" 1.repqual_v1_1953 = "{bf:1953 Election}" 1.repqual_v1_1957 = "{bf:1957 Election}" 1.repqual_v1_1961 = "{bf:1961Election}" 1.repqual_v1_1965 = "{bf:1965 Election}" 1.repqual_v1_1969 = "{bf:1969 Election}", labsize(vsmall))  legend(off) coeflabels(, notick labgap(5) labsize(vsmall)) ci(95 90)   legend(off) ciopts(lwidth(1 ..) lcolor(*.2 *.9 )) msize(medium) xline(0)


graph export "/Figures/Figure_A5.pdf", replace



*******************************************
* Figure A-7 [Sentiment Score]
*******************************************

use "2_historical_gemeinde_1949_1969.dta", clear

sum mean_sentiment_score

hist mean_sentiment_score, xtitle(Sentiment Score)

graph export "/Figures/Figure_A7.pdf", replace


*******************************************
* Table A-10 [Sentiment Score]
*******************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
areg csu_1949_histgem max_repression_int  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A10.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

areg csu_1953_histgem max_repression_int  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A10.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1957_histgem max_repression_int  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A10.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1961_histgem max_repression_int  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A10.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1965_histgem max_repression_int  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A10.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 

areg csu_1969_histgem max_repression_int  ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939  ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A10.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) 



***********************************************
* Table A-11 (Vote for Other Parties in 1949)
***********************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 


qui sum spd_1949
local dvmean = r(mean)
areg spd_1949 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A11.tex", replace dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons nonotes addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")


qui sum fdp_1949
local dvmean = r(mean)
areg fdp_1949  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A11.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum bayernpartei_1949
local dvmean = r(mean)
areg bayernpartei_1949  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A11.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons


qui sum wav_1949
local dvmean = r(mean)
areg wav_1949  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A11.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons


qui sum kpd_1949
local dvmean = r(mean)
areg kpd_1949  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A11.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons


***********************************************
* Table A-12 (Vote for Other Parties in 1953)
***********************************************

use "2_historical_gemeinde_1949_1969.dta", clear


** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 

qui sum spd_1953
local dvmean = r(mean)
areg spd_1953 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", replace dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")


qui sum bayernpartei_1953
local dvmean = r(mean)
areg bayernpartei_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum fdp_1953
local dvmean = r(mean)
areg fdp_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum dp_1953
local dvmean = r(mean)
areg dp_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum dns_1953
local dvmean = r(mean)
areg dns_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum bhe_1953
local dvmean = r(mean)
areg bhe_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum gvp_1953
local dvmean = r(mean)
areg gvp_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons
 
qui sum drp_1953
local dvmean = r(mean)
areg drp_1953  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A12.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons


***********************************************
* Table A-13  [Vote for Other Parties in 1957]
***********************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 

qui sum spd_1957
local dvmean = r(mean)
areg spd_1957 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A13.tex", replace dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

qui sum bhe_1957
local dvmean = r(mean)
areg bhe_1957 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A13.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum fdp_1957
local dvmean = r(mean)
areg fdp_1957 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A13.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum dp_1957
local dvmean = r(mean)
areg dp_1957 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A13.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum bayernpartei_1957
local dvmean = r(mean)
areg bayernpartei_1957 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A13.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons



***********************************************
* Table A-14 (Vote for Other Parties in 1961)
***********************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 

qui sum spd_1961
local dvmean = r(mean)
areg spd_1961 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A14.tex", replace dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")


qui sum fdp_1961
local dvmean = r(mean)
areg fdp_1961 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A14.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum gdp_dp0bhe_1961
local dvmean = r(mean)
areg gdp_dp0bhe_1961 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A14.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}") 

qui sum dfu_1961
local dvmean = r(mean)
areg dfu_1961 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A14.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum dg_1961
local dvmean = r(mean)
areg dg_1961 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A14.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum drp_1961
local dvmean = r(mean)
areg drp_1961 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A14.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons


***********************************************
* Table A-15 [Vote for Other Parties in 1965]
***********************************************

use "2_historical_gemeinde_1949_1969.dta", clear


** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 

qui sum spd_1965
local dvmean = r(mean)
areg spd_1965 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A15.tex", replace dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

qui sum fdp_1965
local dvmean = r(mean)
areg fdp_1965 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A15.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum aud_1965
local dvmean = r(mean)
areg aud_1965 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A15.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum dfu_1965
local dvmean = r(mean)
areg dfu_1965 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A15.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum npd_1965
local dvmean = r(mean)
areg npd_1965 treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A15.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons


***********************************************
* Table A-16 (Vote for Other Parties in 1969)
***********************************************

use "2_historical_gemeinde_1949_1969.dta", clear


** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 

qui sum spd_69_list
local dvmean = r(mean)
areg spd_69_list treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A16.tex", replace dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons addnote("\footnotesize{All controls and modern-day fixed effects included. Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

qui sum fdp_69_list
local dvmean = r(mean)
areg fdp_69_list treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A16.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum npd_69_list
local dvmean = r(mean)
areg npd_69_list treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A16.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum bp_69_list
local dvmean = r(mean)
areg bp_69_list treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A16.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons

qui sum adf_69_list
local dvmean = r(mean)
areg adf_69_list treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A16.tex", append dec(2) label keep(treated_town_cont) addstat(DV average, `dvmean') nocons



*********************************************************
** Table A-17 [DiD Design]
*********************************************************
do "ii_did_data_building.do"

use "5_did_landkreis_year_data.dta", replace

** Note to coder: The output is manually formatted by dropping the 'drop(group(year))' fixed effects. 

** (1) Contiuous 
xtset id_hist_landkreis election_year
xtdidregress (catholic_vote_share_histlandk) (cont_pc_repression_histlandk, continuous) , group(id_hist_landkreis) time(election_year) vce(cluster id_hist_landkreis) 
outreg2 using "/Tables/Table_A17.tex", replace dec(2) label nonotes addnote("\footnotesize{Year and Historical District FE indluded. Clustered standar error at historical district: *** p<0.01, ** p<0.05, * p<0.1.}")

** (2) High/low Repression per capita
xtdidregress (catholic_vote_share_histlandk) (high_pc_repression_histlandk), group(id_hist_landkreis) time(election_year) vce(cluster id_hist_landkreis)
outreg2 using "/Tables/Table_A17.tex", append dec(2)  


** (3) High/low with Voter's growth control
xtdidregress (catholic_vote_share_histlandk growth_voters) (high_pc_repression_histlandk), group(id_hist_landkreis) time(election_year) vce(cluster id_hist_landkreis)
outreg2 using "/Tables/Table_A17.tex", append dec(2) label


*********************************************************
** Figure A-8 (Pre-trends Test)
********************************************************

* do "_did_data_building.do"

use "5_did_landkreis_year_data.dta", replace

** Note to coder: We report the "Observed Means" figure (left panel) of the resulting figure. For that, we open Stata's "Graph Editor" and manually drop/hide all elements of the "Linear-Trends-model" (right panel). We save the manually formatted figure as "Figure_A8.pdf"

xtdidregress (catholic_vote_share_histlandk) (high_pc_repression_histlandk), group(id_hist_landkreis) time(election_year) vce(cluster id_hist_landkreis)
estat trendplots, ytitle(Catholic Vote Share)
estat ptrends

graph export "/Figures/Figure_A8.pdf", replace


*********************************************************
* Table A-18 (Intensive Margin)
*********************************************************

use "2_historical_gemeinde_1949_1969.dta", clear

* Exploit Intensive Margin by focusing only on "treated" gemeinde.
drop if treated_town_dummy == 0 

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
	
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A18.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

areg csu_1953_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A18.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1957_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A18.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1961_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A18.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A18.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A18.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


****************************************************
* Table A-19 [Augsburg Diocese: Appointment Date]
****************************************************

** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document, and "\begin{sidewaystable}" right before the tabular begins and "\end{sidewaystable}" right after. Also, FE row added manually.

use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
		
keep if name_diocese == "Augsburg"
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, r absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

use "3_historical_gemeinde_1949_1969_Augsburg.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933, vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes)


** 1953 
use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"

keep if name_diocese == "Augsburg"
areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil_servants_1939 ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem,  vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

use "3_historical_gemeinde_1949_1969_Augsburg.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
areg csu_1953_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem,  vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1957
use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
keep if name_diocese == "Augsburg"
areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem, vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

use "3_historical_gemeinde_1949_1969_Augsburg.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
areg csu_1957_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem  , vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1961
use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
keep if name_diocese == "Augsburg"
areg csu_1961_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem, vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

use "3_historical_gemeinde_1949_1969_Augsburg.dta", clear
** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem , vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1965
use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
keep if name_diocese == "Augsburg"
areg csu_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

use "3_historical_gemeinde_1949_1969_Augsburg.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"

areg csu_1965_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

** 1969
use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
keep if name_diocese == "Augsburg"
areg csu_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem , vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

use "3_historical_gemeinde_1949_1969_Augsburg.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
areg csu_1969_histgem  treated_town_cont ln_population_1933 cath_28_vote ln_civil ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933  perc_change_elig_v_69_49_histgem ,vce(robust) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A19.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)



****************************************************
** Table A-20 [Associations]
****************************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Note to coder: This code creates a long table. For easier inspection, add "\usepackage{rotating}" to the preamble of the latex document,  and "\begin{sidewaystable}" right before the tabular begins and  "\end{sidewaystable}" right after. Also, FE row added manually 


** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
* 1949 
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 total_assoc_types, cluster(id_hist_landkreis) absorb(id_modern_landkreis) 
outreg2 using "/Tables/Table_A20.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

* 1949
areg csu_1949_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933  men_youth_association women_youth_association men_worker_association women_worker_association press_association cathgermany_association, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes)


* 1953 
areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem total_assoc_types, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1953
areg csu_1953_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem  men_youth_association women_youth_association men_worker_association women_worker_association press_association cathgermany_association, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1957 
areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem total_assoc_types, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


* 1957
areg csu_1957_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem  men_youth_association women_youth_association men_worker_association women_worker_association press_association cathgermany_association, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1961
areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem  total_assoc_types, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1961
areg csu_1961_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem  men_youth_association women_youth_association men_worker_association women_worker_association press_association cathgermany_association, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1965 
areg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem total_assoc_types, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1965 
areg csu_1965_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem men_youth_association women_youth_association men_worker_association women_worker_association press_association cathgermany_association, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1969 
areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem total_assoc_types, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


* 1969 
areg csu_1969_histgem treated_town_cont ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem men_youth_association women_youth_association men_worker_association women_worker_association press_association cathgermany_association, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A20.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


*******************************************
* Table A-21 [Kulturkampf] 
*******************************************


use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
	
areg csu_1949_histgem  treated_town_cont intensity_court ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A21.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

areg csu_1953_histgem  treated_town_cont intensity_court ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A21.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1957_histgem  treated_town_cont intensity_court ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A21.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1961_histgem  treated_town_cont intensity_court ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A21.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1965_histgem  treated_town_cont intensity_court ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A21.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

areg csu_1969_histgem treated_town_cont intensity_court ln_population_1933 cath_28_vote ln_civil_servants_1939  ln_income_tax residen_bin agriculture_pop_1939 nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A21.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)




*******************************************
* Table A-22 [Brown Priests] 
*******************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
* 1949 
areg csu_1949_histgem treated_town_cont bp_present ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A22.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

* 1953 
areg csu_1953_histgem treated_town_cont bp_present ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_53_49_histgem , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A22.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1957 
areg csu_1957_histgem treated_town_cont bp_present ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_57_49_histgem  , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A22.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1961
areg csu_1961_histgem treated_town_cont bp_present ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_61_49_histgem  , cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A22.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1965 
areg csu_1965_histgem treated_town_cont bp_present ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A22.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1969 
areg csu_1969_histgem treated_town_cont bp_present ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A22.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)



*******************************************
* Table A-23 [Expellees] 
*******************************************

use "2_historical_gemeinde_1949_1969.dta", clear

** Relabel for formatting efficiency
	label variable csu_1949_histgem "1949"
	label variable csu_1953_histgem "1953"
	label variable csu_1957_histgem "1957"
	label variable csu_1961_histgem "1961"
	label variable csu_1965_histgem "1965"
	label variable csu_1969_histgem "1969"
	
	
* 1949 
areg csu_1949_histgem treated_town_cont expellees_1950_per_th ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote perc_catholic_1933, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A23.tex", replace dec(2) label addtext($\Delta$ Eligible Voters wrt 1949, No, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at historical district level: *** p<0.01, ** p<0.05, * p<0.1.}")

* 1953 
areg csu_1953_histgem treated_town_cont expellees_1950_per_th ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote  perc_catholic_1933 perc_change_elig_v_53_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A23.tex", append dec(2) label drop(perc_change_elig_v_53_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1957 
areg csu_1957_histgem treated_town_cont expellees_1950_per_th ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote   perc_catholic_1933 perc_change_elig_v_57_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A23.tex", append dec(2) label drop(perc_change_elig_v_57_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1961 
areg csu_1961_histgem treated_town_cont expellees_1950_per_th ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote  perc_catholic_1933 perc_change_elig_v_61_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A23.tex", append dec(2) label drop(perc_change_elig_v_61_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1965 
areg csu_1965_histgem treated_town_cont expellees_1950_per_th ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote  perc_catholic_1933 perc_change_elig_v_65_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A23.tex", append dec(2) label drop(perc_change_elig_v_65_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1969
areg csu_1969_histgem treated_town_cont expellees_1950_per_th ln_population_1933 cath_28_vote  ln_civil_servants_1939  residen_bin agriculture_pop_1939 ln_income_tax nazi_28_vote  perc_catholic_1933 perc_change_elig_v_69_49_histgem, cluster(id_hist_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A23.tex", append dec(2) label drop(perc_change_elig_v_69_49_histgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)



************************************
** Table A-24 [Placebo]
************************************

use "4_modern_gemeinde_1961_2021.dta", clear

** Note to coder: FE row added manually 

** #priests repressed per 1,000 capita (1969)
areg share_yes_ban aggr_intensive_per_th_cap_1969 aggr_perc_catholic_1933 ln_aggr_population_1933 aggr_cath_28_vote aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939 ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_09_49_newgem , cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A24.tex", replace dec(2) label  keep(aggr_intensive_per_th_cap_1969) nocons addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes, Controls, Yes) nonotes addnote("\footnotesize{Standard errors clustered at modern district level: *** p<0.01, ** p<0.05, * p<0.1.}")

** #priests repressed per 1,000 capita (1933)
areg share_yes_ban aggr_intensive_per_th_cap_1933 aggr_perc_catholic_1933 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote  aggr_residen_dum perc_change_elig_v_09_49_newgem, cluster(id_modern_landkreis) absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A24.tex", append dec(2) label keep(aggr_intensive_per_th_cap_1933) nocons addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes, Controls, Yes)


*******************************************************
** Table A-25 [Mass Attendance - Regression Table]
*******************************************************

use "4_modern_gemeinde_1961_2021.dta", clear

** Note to coder: FE row added manually 

* 1970 Mass Attendance
areg mass_attendance_new_gem_1970 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_69_49_newgem aggr_perc_catholic_1933, robust  absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A25.tex", replace dec(2) label drop(perc_change_elig_v_69_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes) nonotes addnote("\footnotesize{Standard errors clustered at modern district level: *** p<0.01, ** p<0.05, * p<0.1.}")

* 1980 Mass Attendance
areg mass_attendance_new_gem_1980 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_80_49_newgem aggr_perc_catholic_1933, robust   absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A25.tex", append dec(2) label drop(perc_change_elig_v_80_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)

* 1990 Mass Attendance 
areg mass_attendance_new_gem_1990 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum perc_change_elig_v_90_49_newgem aggr_perc_catholic_1933,  robust absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A25.tex", append dec(2) label drop(perc_change_elig_v_90_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


* 2010 Mass Attendance
areg mass_attendance_new_gem_2010 aggr_intensive_per_th_cap_1969 ln_aggr_population_1933 aggr_cath_28_vote  aggr_agricultural_workers_1939 ln_aggr_civil_servants_1939  ln_aggr_income_tax aggr_nazi_28_vote aggr_residen_dum  perc_change_elig_v_09_49_newgem aggr_perc_catholic_1933, robust absorb(id_modern_landkreis)
outreg2 using "/Tables/Table_A25.tex", append dec(2) label drop(perc_change_elig_v_09_49_newgem) addtext($\Delta$ Eligible Voters wrt 1949, Yes, Modern district fixed effect, Yes)


** END

log close
